<%--
  Created by IntelliJ IDEA.
  User: owner
  Date: 2018-08-07
  Time: 11:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="index_product">
    <c:forEach items="${categories}" var="cat" varStatus="st1">
        <div class="index_myproduct">
            <div class="index_myproduct_title">
                <div></div>
                <b>${cat.name}</b>
            </div>
            <c:forEach items="${cat.products}" var="pro" begin="0" end="4" varStatus="st2">
                <div class="index_myproduct_content">
                    <a href="foreproduct?pid=${pro.id}">
                        <img src="img/productSingle_middle/${pro.firstProductImage.id}.jpg" alt="product${st2.index}" width="100px">
                    </a>
                    <a href="/foreproduct?pid=${pro.id}">
                        <div class="myproduct_content">[热销]${fn:substring(pro.name, 0, 20)}</div>
                        <div class="myproduct_price">
                            <fmt:formatNumber type="number" value="${pro.promotePrice}" minFractionDigits="2"/>
                        </div>
                    </a>
                </div>
            </c:forEach>
        </div>
        <div style="clear: both"></div>
    </c:forEach>
    <img src="img/site/end.png" class="endpng" id="endpng">
</div>
